<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="display"  uri="http://displaytag.sf.net"%>
    <%@taglib prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Listagem de donos</title>
</head>
<body>
<div style="padding: 10px; padding-left: 20px;">
<display:table list="%{entities}" cellpadding="0" cellspacing="0"
	class="defaultTable" sort="list" pagesize="2" id="pessoa"
	requestURI="${pageContext.request.contextPath}/model/Dono!search.action">
		<display:column title="Nome" property="${pessoa.nome}" sortable="true"/>
		<display:column title="Cpf" property="cpf"/>
		<display:column title="E-mail" property="email" sortable="true"/>
		<display:column title="Endereço" property="endereco"/>
		<display:column title="Telefone" property="telefone"/>
		<display:column title="Celular" property="celular"/>
		<display:column title="Sexo" property="sexo"/>
		<display:column title="Show" >
		<s:if test="%{#pessoa.isPossuiAnimais()}">
		      <a href="${pageContext.request.contextPath}/model/Animal!searchId.action?entitySearchFilter.dono.id=%{#pessoa.id}">show</a>
		</s:if>    
		<s:else>
			 <a href="#">show</a>
		</s:else>
		</display:column>
</display:table>
 </div>
</body>
</html>